package com.learn.chapter03;

import com.mchange.v2.c3p0.ComboPooledDataSource;
import org.apache.ibatis.datasource.unpooled.UnpooledDataSourceFactory;

public class C3P0DataSource extends UnpooledDataSourceFactory {

  public static ComboPooledDataSource c3p0DataSource;

  public C3P0DataSource() {
    this.dataSource = new ComboPooledDataSource();
    c3p0DataSource = (ComboPooledDataSource) this.dataSource;
  }

  public static ComboPooledDataSource getC3P0DataSource() {
    return c3p0DataSource;
  }
}
